//
//  PlayViewController.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/13.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "PlayViewController.h"

@interface PlayViewController ()
@property(nonatomic,retain)MPMoviePlayerController *moviePlayer;
@end

@implementation PlayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor =[UIColor whiteColor];
    //NSString *file = [[NSBundle mainBundle] pathForResource:self.strurl ofType:@"mov"];
    NSURL *url = [NSURL URLWithString:self.strurl];
        self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
        _moviePlayer.shouldAutoplay = YES;
    [_moviePlayer.view setFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height*2/3)];
    [self.view addSubview:_moviePlayer.view];
    [_moviePlayer play];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
